package com.hunktimes.wholesale.base

import android.os.Bundle
import android.view.View
import android.widget.TextView
import androidx.annotation.StringRes
import androidx.fragment.app.Fragment
import androidx.navigation.Navigation
import com.hunktimes.wholesale.R

/**
 * Author: Delete
 * Date: 2020/7/23 9:18
 * Description:
 *
 */
open class BaseFragment : Fragment {

    constructor() : super()
    constructor(contentLayoutId: Int) : super(contentLayoutId)

    protected val rootNavController by lazy {
        Navigation.findNavController(requireActivity(), R.id.nav_root_activity)
    }

    protected val homeNavController by lazy {
        Navigation.findNavController(requireActivity(), R.id.nav_main_fragment)
    }

    /**
     * 实否要 拦截返回键
     * 默认: 不拦截
     * @return boolean
     */
    open fun onBackPressed() = false


}